Skip to content

Jenkins Health code-bundle#454

Merged
stewartshea merged 72 commits intorunwhen-contrib:mainfrom
infracloudio:jenkins-cb
Mar 26, 2025
Merged

Jenkins Health code-bundle#454
stewartshea merged 72 commits intorunwhen-contrib:mainfrom
infracloudio:jenkins-cb

Conversation

@saurabh3460
Copy link
Copy Markdown
Contributor

@saurabh3460 saurabh3460 commented Jan 24, 2025

The SLI produces a score of 0 (bad), 1(good), or a value in between. This score is generated by capturing the following:

  • Check if Jenkins instance is reachable and responding (endpoint)
  • Check For Failed Build Logs in Jenkins
  • Check For Long Running Builds in Jenkins
  • Check For Long Queued Builds in Jenkins
  • Check Jenkins Executor Utilization

@saurabh3460
Copy link
Copy Markdown
Contributor Author

Hi @stewartshea,

Could you please assist with the generation rule and review the changes made so far? While there are more tasks to be added, I’d appreciate your feedback on how we could further structure this effectively.

Thanks

@saurabh3460 saurabh3460 force-pushed the jenkins-cb branch 3 times, most recently from cd1b0e2 to 0ced945 Compare February 4, 2025 12:04
@saurabh3460 saurabh3460 force-pushed the jenkins-cb branch 3 times, most recently from 7216b6e to 0bd14cb Compare February 19, 2025 04:43
@saurabh3460 saurabh3460 force-pushed the jenkins-cb branch 2 times, most recently from 6d3df8e to 9495c1e Compare February 28, 2025 11:24
saurabh3460 and others added 20 commits March 4, 2025 11:39
- Check For Recent Failed Tests in Jenkins
- Check For Jenkins Health
- Check For Long Queued Builds in Jenkins
- Check Jenkins Executor Utilization
- Check For Recent Failed Tests in Jenkins
- Check For Jenkins Health
- Check For Long Queued Builds in Jenkins
- Check Jenkins Executor Utilization
@saurabh3460 saurabh3460 marked this pull request as ready for review March 4, 2025 13:03
@saurabh3460 saurabh3460 requested a review from a team as a code owner March 4, 2025 13:03
@stewartshea
Copy link
Copy Markdown
Contributor

@CodiumAI-Agent /describe

@QodoAI-Agent
Copy link
Copy Markdown

QodoAI-Agent commented Mar 11, 2025

Title

(Describe updated until commit dac2d47)

Jenkins Health code-bundle


User description

The SLI produces a score of 0 (bad), 1(good), or a value in between. This score is generated by capturing the following:

  • Check if Jenkins instance is reachable and responding (endpoint)
  • Check For Failed Build Logs in Jenkins
  • Check For Long Running Builds in Jenkins
  • Check For Long Queued Builds in Jenkins
  • Check Jenkins Executor Utilization

PR Type

Enhancement, Tests, Documentation


Description

  • Add Robot Framework tasks for comprehensive Jenkins health.

  • Implement shell scripts for long running builds and log retrieval.

  • Introduce Terraform and Taskfile configs for test infrastructure.

  • Provide detailed error patterns and testing documentation.


Changes walkthrough 📝

Relevant files
Enhancement
5 files
runbook.robot
Add comprehensive Jenkins health tasks.                                   
+325/-0 
long_running_builds.sh
Script to detect jobs running over threshold.                       
+102/-0 
failed_build_logs.sh
Script to fetch and format failed build logs.                       
+81/-0   
jenkins.py
New library exposing Jenkins keywords for Robot.                 
+500/-0 
__init__.py
Initializer for Jenkins library module.                                   
+1/-0     
Tests
9 files
sli.robot
Introduce SLI metric tasks for Jenkins health.                     
+201/-0 
create_jenkins_token.sh
Terraform script for Jenkins token generation.                     
+72/-0   
Taskfile.yaml
Taskfile for building and testing infrastructure.               
+381/-0 
Taskfile.yaml
Terraform Taskfile to run infra tests and cleanup.             
+69/-0   
interactive_console_output.xml
Sample Robot Framework interactive console output.             
+25/-0   
python-docker-pipeline.xml
Jenkins pipeline config XML for Docker-based tests.           
+36/-0   
failed-pipeline.xml
XML pipeline config for a failing Jenkins job.                     
+46/-0   
long-running-job.xml
Job config XML for a long running build scenario.               
+43/-0   
failed-job.xml
Job config XML for an intentionally failing build.             
+39/-0   
Configuration changes
2 files
main.tf
Terraform configuration for Jenkins server setup.               
+384/-0 
provider.tf
AWS provider configuration for test infra.                             
+3/-0     
Documentation
3 files
error_patterns.json
Add JSON file with error patterns for log analysis.           
+268/-0 
README.md
Documentation for testing Jenkins codebundle.                       
+135/-0 
jenkins-instance-health-sli.yaml
Template for Jenkins instance health SLI configuration.   
+49/-0   
Additional files
4 files
jenkins-instance-health.yaml +29/-0   
jenkins-instance-health-slx.yaml +20/-0   
jenkins-instance-health-taskset.yaml +31/-0   
README.md +25/-0   

Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @stewartshea
    Copy link
    Copy Markdown
    Contributor

    Nice work! Thanks!

    @stewartshea stewartshea merged commit b833ae6 into runwhen-contrib:main Mar 26, 2025
    1 check passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants